







Texture2D shaderTexture;
SamplerState SampleType;

cbuffer LightBuffer
{
    float3 lightDirection;
	float padding;
};





struct PixelInputType
{
    float4 position : SV_POSITION;
    float2 tex : TEXCOORD0;
	float3 normal : NORMAL;
};





float4 LightPixelShader(PixelInputType input) : SV_TARGET
{
	float4 textureColor;
	float3 lightDir;
	float lightIntensity;
	float4 color;


	
	textureColor = shaderTexture.Sample(SampleType, input.tex);


    lightDir = -lightDirection;

    // Calculate the amount of light on this pixel.
    lightIntensity = saturate(dot(input.normal, lightDir));

    // Determine the final amount of diffuse color based on the texture color combined with the light intensity.
    color = saturate(textureColor * lightIntensity);

    return color;
}
